#ifndef PACKET_H_
#define PACKET_H_
#define PT_PMA 0x20//프로토콜
#define MSG_LOGIN_REQ 0x01
#define MSG_LOGIN_ACK 0x02
typedef struct MSG_LOGIN_REQ_DATA{
	char id[48];
	char pwd[48];
}MSG_LOGIN_REQ_DATA;
typedef struct MSG_LOGIN_ACK_DATA{
	char serverMessage[10];
}MSG_LOGIN_ACK_DATA;
typedef struct _packet_header {
	unsigned long protocol;
	unsigned long msgType;
	unsigned long dataLength;
	unsigned long reserved;
}PACKET_HEADER;
typedef union {
	MSG_LOGIN_REQ_DATA mlrd;
	MSG_LOGIN_ACK_DATA mlad;
}PACKET_DATA;
typedef struct _msec_packet{
    PACKET_HEADER *header;
    PACKET_DATA *data;
} PACKET;
PACKET *makeNewPacket();
PACKET *initPacket(PACKET_HEADER *head, PACKET_DATA *data);
PACKET_HEADER *makeNewPacketHeader();
PACKET_HEADER *initPacketHeader(unsigned long protocol,unsigned long msgType,unsigned long dataLen);
PACKET_DATA *makeNewPacketData();
PACKET_DATA *init_MSG_LOGIN_REQ_DATA(char *message);
PACKET_DATA *init_MSG_LOGIN_ACK_DATA(char *message);
#endif
